﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sunboxsoft.Bases.Web.Models
{
    public class User
    {
        public string Name { get; set; }
        public string Account { get; set; }
        public bool IsEnabled { get; set; }
    }

    public class ApiResult
    {
        public bool IsSuccess { get; set; }
        public int ErrorCode { get; set; }
        public string Message { get; set; }
        public object Data { get; set; }
        public ApiResult(object data)
        {
            Data = data;

            IsSuccess = true;
            ErrorCode = 0;
            Message = string.Empty;
        }
    }

    public class PagedList<T>
    {
        public int Start { get; set; }
        public int Limit { get; set; }
        public int Total { get; set; }
        public List<T> Items { get; set; }
        public PagedList(int start, int limit, int total, List<T> items)
        {
            Items = items;

            Start = start;
            Limit = limit;
            Total = total;
        }
    }
}
